<template>
    <div>
        <el-row>
            <el-col :span="24">
                <div style="margin-left: 600px">
                    <el-button @click="doctorbtn()" type="primary">医生管理</el-button>
                    <el-button @click="jobbtn()" type="primary">职务管理</el-button>
                </div>
            </el-col>
        </el-row>
        <el-row>
            <div v-if="active==1">
                <doctor-manage></doctor-manage>
            </div>
            <div v-if="active==2">
                <job-manage></job-manage>
            </div>
        </el-row>
    </div>
</template>

<script>
    import DoctorManage from './DoctorManage'
    import JobManage from './JobManage'
    export default {
        name: "Member",
        components: {JobManage, DoctorManage},
        component: {
            DoctorManage,
            JobManage
        },
        data() {
            return {
                active: 1
            };
        },
        methods: {
            doctorbtn() {//医生管理
                if (this.active == 2) {
                    this.active--;
                }
            },
            jobbtn() {
                if (this.active == 1) {
                    console.log(this.active);
                    this.active++;
                }
            },
        },

    }
</script>

<style scoped>

</style>